package com.jlastu.androiduidemo.views;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.Toast;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.jlastu.androiduidemo.R;
import com.jlastu.androiduidemo.widget.HeaderView;

public class Add_course extends AppCompatActivity {
    private Button mb2;
    private Button madd_course;
    private HeaderView mHEaderview2;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.add_course);
        mHEaderview2=findViewById(R.id.header_view2);
        mHEaderview2.setTitle("添加课程");

        mb2=findViewById(R.id.b2);
        mb2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackPressed();
            }
        });


        madd_course=findViewById(R.id.add_course);
        madd_course.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//                if () {
                Toast.makeText(Add_course.this, "添加成功", Toast.LENGTH_SHORT).show();
                Intent intent=new Intent(Add_course.this, SettingsActivity.class);
                startActivity(intent);
//                }
//                else {
//                    Toast.makeText(Edit.this, "所有项都不可为空", Toast.LENGTH_SHORT).show();
//                }
            }
        });


    }

}
